public class Solution4 {
    //24. 两两交换链表中的节点
    public ListNode swapPairs(ListNode head) {
        if (head == null || head.next == null) {
            return head;
        }
        ListNode newHead =  swapPairs(head.next.next);
        ListNode ret = head.next;
        head.next.next = head;
        head.next = newHead;
        return ret;
    }
}
